package com.jsj.bootdemo.controller;

import com.jsj.bootdemo.common.BaseResponse;
import com.jsj.bootdemo.pojo.publicSecurity;
import com.jsj.bootdemo.pojo.publicSecurityDto;
import com.jsj.bootdemo.service.powerPublicsecurityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/powerPublicsecurity")
public class PowerPublicsecurityController {

    @Autowired
    powerPublicsecurityService powerPublicsecurityService;

    @GetMapping("/info")
    public BaseResponse publicSecurityInfo(){
        String data = powerPublicsecurityService.publicSecurityInfo();
        return BaseResponse.ok(data);
    }

    @GetMapping("/seepublicSecurity")
    public BaseResponse SecurityInfoSpecific(){
        List<publicSecurity> data = powerPublicsecurityService.SecurityInfoSpecific();
        return BaseResponse.ok(data);
    }
}
